package com.okilo.online.app.weight.font

import android.content.Context
import android.graphics.Typeface
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatButton

/**
 * OkiloLoan
 *
 * @Author wwdeng
 * @CreateTime: 2025/10/27 15:51
 * @Annotation：
 */
class OkiloRbtSemiBoldButton : AppCompatButton {
    constructor(context: Context) : super(context){
        initView()
    }

    constructor(context: Context, attrs: AttributeSet?) : super(context, attrs){
        initView()
    }

    constructor(context: Context, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr){
        initView()
    }

    private fun initView(){
        //禁用文本大写
        isAllCaps = false
    }

    override fun setTypeface(tf: Typeface?) {
        super.setTypeface(tf)
    }

    override fun setTypeface(tf: Typeface?, style: Int) {
        super.setTypeface(Typeface.createFromAsset(context.assets, "fonts/Rbt-SemiBold.ttf"))
    }
}